<template>
  <div>
    <div class="add_btn_top">
      <el-button size="mini" @click="handleBack">返 回</el-button>
    </div>
    <iframe
      v-init-screen-h="10"
      style="width: 100%"
      :src="src"
      frameborder="0"
    ></iframe>
  </div>
</template>

<script>
import { getTemplateToken } from "@/api/technology";
export default {
  data() {
    return {
      src: ""
    };
  },
  computed: {
    tenant() {
      return this.$store.state.user.tenant;
    }
  },
  async mounted() {
    // const res = await getTemplateToken(this.$route.query.id);
    // const { manufactureSite } = res.data;
    this.src = `${process.env.VUE_APP_JIMU_URL}/jmreport/index/${this.$route.query.id}?menuType=datainfo&isCreate=true&Authorization=Bearer ${this.$store.state.user.accessToken}&tenantName=${this.tenant.token}&author=${this.$store.state.user.user.username}&SUPERLINK_BASE_URL=${process.env.VUE_APP_BASE_URL}&manufactureSite=${this.$route.query.manufactureSite}`;
  },
  methods: {
    handleBack() {
      this.$router.push({
        name: "templateListAdmin"
      });
    }
  }
};
</script>

<style lang="scss" scoped></style>
